function doWork(masterComboId, detailComboId, languageName)
{
    jQuery("#searchLeftSide").hide();
	httpObject = getHTTPObject();
  	if (httpObject != null) {
  		var parentCombo = document.getElementById(masterComboId);
  		if (parentCombo) {
  		    if (detailComboId) {
  		        var url = "../../../../Ajax/ModelMasterDetailAjax.aspx?masterItemId=" + parentCombo.value + "&languageName=" + languageName;
  			    httpObject.open("GET", url, true);
  			    httpObject.onreadystatechange = function() {
  			        if (httpObject.readyState == (1 || 0)) {
  			            jQuery("#ajaxStatementInfo").show();
  			            jQuery("#ajaxStatementInfo").css('width', '929px');
  			            jQuery("#ajaxStatementInfo").css('margin-top', '0');
  			            jQuery("#ajaxStatementInfo").css('float', 'none');
  			            jQuery("#ajaxStatementInfo").html("<img src=\"../../../Content/images/ajax-loader.gif\" alt=\"loading\">");
  			        }
  			        if (httpObject.readyState == 4) {
  			            jQuery("#ajaxStatementInfo").show();
  			            jQuery("#ajaxStatementInfo").html(getTranslation("ajaxSelectModel", languageName));
  			            var combo = document.getElementById(detailComboId);
  			            if (combo != null) {
  			                combo.options.length = 0;
  			                var response = httpObject.responseText;
  			                var items = response.split(";");
  			                var count = items.length;
  			                for (var i = 0; i < count; i++) {
  			                    var options = items[i].split("|");
  			                    if (options[0] != "")
  			                        combo.options[i] = new Option(options[0], options[1]);
  			                } //for
  			                showHideCombo(detailComboId);
  			            } //if
  			        } //if state
  			    } 	//func
  				httpObject.send(null);
  			}	//if
  		}	//if
  	}	//if
}

function clearCombo(comboId)
{
	if (comboId) {
		var comboToClear = document.getElementById(comboId);
		if (comboToClear) {
			comboToClear.options.length = 0;
			comboToClear.options[0] = new Option("---", -1);
		}	//if
	}	//if
}

function showHideCombo(comboId)
{
	if (comboId) {
		var item = document.getElementById('div' + comboId);
		if (item) {
			var comboToShowHide = document.getElementById(comboId);
			if (comboToShowHide) {
				if (comboToShowHide.options) {
					if (comboToShowHide.options.length <= 1) {
						item.style.display = 'none';
					} else {	//if
						item.style.display = 'block';					
					}	//else
				}	//if
			}	//if
		}	//if
	}	//if
};